﻿@model IEnumerable<Chbl.Models.Article>

@{
    ViewBag.Title = "Index";
}
<div class="pad">
    <div class="box2">
        <div class="pad">
            <h3>Статьи</h3>
            <p>
                @Html.ActionLink("Create New", "Create")
            </p>
            <table>
                <tr>
                    <th>
                        Content
                    </th>
                    <th>
                        Date
                    </th>
                    <th></th>
                </tr>

            @foreach (var item in Model) {
                <tr>
                    <td>
                        <span>
                            @Html.Raw(item.Content)
                        </span>
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Date)
                    </td>
                    <td>
                        @Html.ActionLink("Edit", "Edit", new { id=item.ArticleId }) |
                        @Html.ActionLink("Details", "Details", new { id=item.ArticleId }) |
                        @Html.ActionLink("Delete", "Delete", new { id=item.ArticleId })
                    </td>
                </tr>
            }
            </table>
        </div>
    </div>
</div>
